In computer graphics, a curve rendering function is a requirement for displaying vector content, such as outline fonts. In a conventional device, a text display function operates by displaying a row of fixed-size bitmaps, created in advance. However, modern CPU (Central Processing Unit) and LSI (Large Scale Integration) development has enabled bitmaps of arbitrary size to be created in real time from an outline font. An outline font expresses the shape of the characters through a collection of outlines and coordinates serving as reference points, and includes glyph data defining the shapes of the font. Glyph data are made up of a quadratic coordinate point sequence and commands defining the joints between points in the sequence. Font rendering is the process of rasterizing the glyph data. Rasterizing is the process of converting vector data into bitmap data. The vector data are numerical data expressing lines and curves.
TrueType fonts are a representative example of outline fonts. In a TrueType font, the commands are replaced by bits appended to each point so as to indicate whether the point is on the outline, or is a control point for a curve making up the outline. The bits respectively represent line segments and quadratic Bézier curves. That is, a control point on the outline of the font is interpreted as a line segment, while a point not on the outline of the font is interpreted as a quadratic Bézier curve. Accordingly, the font can be rendered by rasterizing line segments and quadratic Bézier curves. Rasterizing is the process of expressing characters and images handled by a computer as collections of small points that can be printed by a printer or displayed by a display device. One method for rasterizing quadratic Bézier curves involves approximating curve commands as a plurality of line segment approximations so as to process all commands as line segments.
The following is an explanation of Bézier curves. A Bézier curve is a parametric curve made up of a start point P0, a control point P1, and an end point P2, expressed using parameter t in Math. 1, below. Similarly, a cubic Bézier curve is made up of a start point P0, control points P1 and P2, and an end point, expressed in Math. 2, below.P(t)=P0×(1−t)2+2×P1×(1−t)×t+P2×t2 (0≦t≦1)  [Math. 1]P(t)=P0×(1−t)3+3×P1×(1−t)2×t+3×P2×(1−t)×t2+P3×t3 (0≦t≦1)  [Math. 2]
As shown in FIG. 19, the Bézier curve defined by points A, B, and C is divisible using midpoint D of line segment AB, midpoint E of line segment BC, and midpoint F of line segment DE into a Bézier curve defined by points A, D, and F (left-hand quadratic Bézier curve) and a Bézier curve defined by points F, E, and C (right-hand quadratic Bézier curve).
Furthermore, as also shown in FIG. 19, the left-hand quadratic Bézier curve is divisible into a Bézier curve defined by points A, G, and I, and a Bézier curve defined by points I, H, and F. Similarly, the right-hand quadratic Bézier curve is divisible into a Bézier curve defined by points F, J, and L, and a Bézier curve defined by points L, K, and C.
By increasing the number of divisions performed in this depthwise-recursive division until a certain level is reached, the lines joining the points are made to approximate the curve for rendering purposes. A determination regarding whether or not to recursively divide is performed once per division and is based on the degree of curvature. The curvature is reduced with each division. Accordingly, segments with curvature low enough to approximate straight lines are hardly ever divided, while segments with high curvature are divided several times so as to reduce the curvature. This enables smooth curve drawing. An example of a conventional recursive curve division method is given by a curve division device perdorming recursive curve division consecutively, using stack memory (e.g., Patent Literature 1).